qinglan.Canvas.Particle = qinglan.Canvas.Sprite.extend(function(id,position,opt){

	this.velocity = opt.velocity || qinglan.Canvas.Vector2.zero.copy();

	this.acceleration = opt.acceleration || qinglan.Canvas.Vector2.zero.copy();

	this.color = qinglan.Canvas.Color.black.copy();

	this.radius = opt.radius || 5;

	this.life = opt.life || 2000;
	
	this.deltaTime = 0.1;

}).methods({
	draw : function(ctx) {
		ctx.fillStyle = this.color.getColorString();
		ctx.beginPath();
		ctx.arc(0, 0, this.radius, 0, Math.PI * 2, true);
		ctx.closePath();
        ctx.fill();
	},
	update : function(ctx) {
		this.position = this.position.add(this.velocity.multiply(this.deltaTime));
		this.velocity = this.velocity.add(this.acceleration.multiply(this.deltaTime));
	},
	destory: function(){

	}
});
